#!/bin/bash

# Link aria2c
ln -sf /usr/bin/aria2c /opt/Motrix/engine/aria2c

# Launch script
cat << 'EOF' > /usr/bin/motrix
#!/bin/bash
export ELECTRON_IS_DEV=0
electron /opt/Motrix/app "$@"
EOF
chmod a+x /usr/bin/motrix